home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20041116-20060924 / 000111_fdc@columbia.edu_Fri Jun 3 17:34:59 2005.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: convert lf -> lf/cr
  5. Date: 3 Jun 2005 21:34:48 GMT
  6. Organization: Columbia University
  7. Lines: 55
  8. Message-ID: <slrnda1j7o.2nu.fdc@sesame.cc.columbia.edu>
  9. References: <1117818075.712279.116900@o13g2000cwo.googlegroups.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1117834488 18120 128.59.59.56 (3 Jun 2005 21:34:48 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 3 Jun 2005 21:34:48 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15350
  17.  
  18. On 2005-06-03, hkdevel@gmail.com <hkdevel@gmail.com> wrote:
  19. : I'm runnig c-kermit 8.0.209 on linux box. I'm connectin to a embedded
  20. : system via serial line with following options set in my config:
  21. :
  22. : set line /dev/ttyUSB0
  23. : set speed 115200
  24. : set carrier-watch off
  25. : set handshake none
  26. : set flow-control none
  27. : robust
  28. : set file type bin
  29. : set file name lit
  30. : set rec pack 1000
  31. : set send pack 1000
  32. : set window 5
  33. : log SESSION /tmp/kermlog-axissaxis
  34. :
  35. : The problem is that remote device sends only lf at the end of the
  36. : string and output in kermit is always indented since cr if missing.
  37. :
  38. : Is there a way to translate lf to lf/cr automaticly?
  39. :
  40. I could have sworn there was but I can't find it in the commands or in
  41. the code.  There is a command:
  42.  
  43.   set terminal cr-display { cr, crlf }
  44.  
  45. to handle bare incoming carriage returns, but none for bare incoming
  46. linefeeds.  Then looking through my notes, I realize I meant to add it quite
  47. some time ago, when the same thing happened to me when I was typing directly
  48. at a PostScript interpreter.  So OK, I moved this item up towards the top of
  49. the list.
  50.  
  51. In the meantime, if you're a C programmer, the modification to ckucns.c
  52. should be pretty straightforward, it would be right here, about line 2246:
  53.  
  54.             if (c == CR && tt_crd) { /* SET TERM CR-DISPLA CRLF? */
  55.                 ckcputc(c);    /* Yes, output CR */
  56.                 if (seslog && !sessft) logchar((char)c);
  57.                 c = LF;    /* and insert a linefeed */
  58.             }
  59.  
  60. Just stuff a CR before passing on the LF:
  61.  
  62.             if (c == LF && tt_crd) { /* SET TERM CR-DISPLA CRLF? */
  63.                 ckcputc(CR); /* Yes, output CR first */
  64.                 if (seslog && !sessft) logchar((char)CR);
  65.             }
  66.  
  67. bearing in mind that then you will have a hacked version in which SET TERM
  68. CR-DISPLAY really means SET TERM LF-DISPLAY.  When the next release (or daily
  69. edit) appears, it will have the new command and you can throw your version out
  70. and use the new one.
  71.  
  72. - Frank